<?php
namespace frontend\widgets\banner;
use Yii;
use yii\bootstrap\Widget;
class BannerWidget extends Widget{
    
    public $item=[];
    public function init(){
        if(empty($this->item)){
        $this->item=[
            ['label'=>'demo',
                'image_url'=>'/statics/images/myImage01.jpg',
                'url'=>['site/index'],
                'html'=>'',
                'active'=>'active',
            ],
            ['label'=>'demo','image_url'=>'/statics/images/myImage02.jpg','url'=>['site/index']],
            ['label'=>'demo','image_url'=>'/statics/images/myImage03.jpg','url'=>['site/index']],
        ];
        }
    }
    public function  run(){
        $data['items']= $this->item;
        return $this->render('index',['data'=>$data]);
    }
    
}